# -*- coding: UTF-8 -*-
"""
@author: tgy
@file: 8.6 创建可管理的属性.py
@time: 2021/02/13
"""


class Person:
    ...

    def __init__(self, name):
        self.name = name

    # name = property(fget,fset,fdel)
    @property
    def name(self):
        return self._name

    @name.setter
    def name(self, name):
        self._name = name

    @name.deleter
    def name(self):
        ...
        assert False, 'not delete name property'


if __name__ == '__main__':
    pass
    person = Person('zhangsan')
    person.name = '123'
    print(person.name)